<template>
  <div class="main">
    <el-container>
      <el-aside :width="isFlag ? '60px' : '210px'">
        <mainAside :isFlag="isFlag"></mainAside>
      </el-aside>
      <el-container>
        <el-header height="50px">
          <mainHeader @fnChangeFlag="fnChangeFlag" :isFlag="isFlag"></mainHeader>
        </el-header>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>
<script setup lang="ts">
import { ref } from "vue"
import mainAside from "@/components/main-aside.vue"
import mainHeader from "@/components/main-header.vue"
let isFlag = ref(false)
function fnChangeFlag(val: boolean) {
  isFlag.value = val
}
</script>
<style scoped lang="scss">
.main {
  width: 100vw;
  height: 100vh;
  .el-container {
    height: 100%;
    .el-aside {
      background-color: #02092c;
      transition: all 0.3s;
    }
    .el-header {
      background-color: #02092c;
    }
  }
}
</style>
